package org.sunspotworld;

import com.sun.spot.sensorboard.EDemoBoard;
import com.sun.spot.sensorboard.io.IIOPin;

/**
 *
 * @author Administrator
 */
public class BeaconSensor {
    EDemoBoard demo = EDemoBoard.getInstance();
    IIOPin beaconPin;
    
    public BeaconSensor( int beaconPinIn ){
       beaconPin = demo.getIOPins()[beaconPinIn];
    }
    
    public boolean detect(){
        return beaconPin.isHigh();
    }
}
